﻿namespace SPRepository
{
    public class UserDto
    {
        private readonly string _email;
        private readonly int _id;
        private readonly bool _isApplicationPrincipal;
        private readonly bool _isDomainGroup;
        private readonly bool _isSiteAdmin;
        private readonly bool _isSiteAuditor;
        private readonly string _loginName;
        private readonly string _name;
        private readonly string _notes;
        private readonly byte[] _rawSid;
        private readonly bool _requireRequestToken;
        private readonly string _sid;

        public UserDto(string email, int id, bool isApplicationPrincipal, bool isDomainGroup, bool isSiteAdmin,
                       bool isSiteAuditor, string loginName, string name, string notes, byte[] rawSid,
                       bool requireRequestToken, string sid)
        {
            _email = email;
            _id = id;
            _isApplicationPrincipal = isApplicationPrincipal;
            _isDomainGroup = isDomainGroup;
            _isSiteAdmin = isSiteAdmin;
            _isSiteAuditor = isSiteAuditor;
            _loginName = loginName;
            _name = name;
            _notes = notes;
            _rawSid = rawSid;
            _requireRequestToken = requireRequestToken;
            _sid = sid;
        }

        public string Email
        {
            get { return _email; }
        }

        public int Id
        {
            get { return _id; }
        }

        public bool IsApplicationPrincipal
        {
            get { return _isApplicationPrincipal; }
        }

        public bool IsDomainGroup
        {
            get { return _isDomainGroup; }
        }

        public bool IsSiteAdmin
        {
            get { return _isSiteAdmin; }
        }

        public bool IsSiteAuditor
        {
            get { return _isSiteAuditor; }
        }

        public string LoginName
        {
            get { return _loginName; }
        }

        public string Name
        {
            get { return _name; }
        }

        public string Notes
        {
            get { return _notes; }
        }

        public byte[] RawSid
        {
            get { return _rawSid; }
        }

        public bool RequireRequestToken
        {
            get { return _requireRequestToken; }
        }

        public string Sid
        {
            get { return _sid; }
        }

        //TODO: Add Groups, OwnerGroups, SPUserToken
    }
}